<?php

# Where gmetad stores the rrd archives.
$rrds = "/var/lib/mysql/collectd/";

# Leave this alone if rrdtool is installed in $gmetad_root,
# otherwise, change it if it is installed elsewhere (like /usr/bin)
define("RRDTOOL", "/usr/bin/rrdtool");

#
# If you want to grab data from a different ganglia source specify it here.
# Although, it would be strange to alter the IP since the Round-Robin
# databases need to be local to be read.
#
$ganglia_ip = "127.0.0.1";
$ganglia_port = 8652;

#
# The maximum number of dynamic graphs to display.  If you set this
# to 0 (the default) all graphs will be shown.  This option is
# helpful if you are viewing the web pages from a browser with a
# small pipe.
#
$max_graphs = 0;

#
# Turn on and off the Grid Snapshot. Now that we have a
# hierarchical snapshot (per-cluster instead of per-node) on
# the meta page this makes more sense. Most people will want this
# on.
#
$show_meta_snapshot = "yes";

#
# The default refresh frequency on pages.
#
$default_refresh = 300;

$max_unique_colors = 30;
$unique_color[0]  = "ff0000";
$unique_color[1]  = "00ff00";
$unique_color[2]  = "0000ff";
//$unique_color[2]  = "00ff00";
//$unique_color[1]  = "0000ff";
$unique_color[3]  = "ffff00";
//$unique_color[3]  = "ff00ff";
$unique_color[4]  = "ff00ff";
$unique_color[5]  = "00ffff";
$unique_color[6]  = "bb0000";
$unique_color[7]  = "00bb00";
$unique_color[8]  = "0000bb";
$unique_color[9]  = "bbbb00";
$unique_color[10] = "bb00bb";
$unique_color[11] = "00bbbb";
$unique_color[12] = "b22222";
$unique_color[13] = "adff2f";
$unique_color[14] = "ff1493";
$unique_color[15] = "f0e68c";
$unique_color[16] = "dda0dd";
$unique_color[17] = "8a2be2";
$unique_color[18] = "880000";
$unique_color[19] = "008800";
$unique_color[20] = "000088";
$unique_color[21] = "888800";
$unique_color[22] = "880088";
$unique_color[23] = "008888";
$unique_color[24] = "ff4500";
$unique_color[25] = "90ee90";
$unique_color[26] = "7b68ee";
$unique_color[27] = "aaaaaa";
$unique_color[28] = "87ceeb";
$unique_color[29] = "daa520";

#
# Default color for single metric graphs
#
$default_metric_color = "0000ff";

#
# Default metric
#
$default_metric = "cpu_used";

#
# Time ranges
# Each value is the # of seconds in that range.
#
$time_ranges = array(
   'hour'=>3600,
   'day'=>86400,
   '2day'=>172800,
   'week'=>604800,
   'month'=>2419200,
   '2month'=> 4838400,
   'year'=>31449600
);


# this key must exist in $time_ranges
$default_time_range = 'hour';

#
# Graph sizes
#
$graph_sizes = array(
   'small'=>array(
     'height'=>40,
     'width'=>130,
     'font'=>'DEFAULT:8',
   ),
   'medium'=>array(
     'height'=>75,
     'width'=>300,
     'font'=>'DEFAULT:8',
   ),
   'large'=>array(
     'height'=>600,
     'width'=>1024,
     'font'=>'DEFAULT:12',
   ),
   # this was the default value when no other size was provided.
   'default'=>array(
     'height'=>100,
     'width'=>400,
     'font'=>'DEFAULT:8',
   )
);
$default_graph_size = 'default';
$graph_sizes_keys = array_keys( $graph_sizes );

$hadoopProcList = array("hadoop-Total", "hadoop-DataNode",
      "hadoop-TaskTracker", "hadoop-TotalMRJob");
//$hadoopProcList = array("hadoop-DataNode", "hadoop-TaskTracker");

$metric_scale = array(
  'cpup' => 1/100,
  'memp' => 1/100,
  'vmsize' => 1,
  'vmrss' => 1,
  'readbytes' => 1,
  'writebytes' => 1
);

//should be automatical...
$metric_cluster_upper = array(
  'cpup' => 64 * 8,
  'memp' => 64,
  'vmsize' => 0,
  'vmrss' => 0,
  'readbytes' => 0,
  'writebytes' => 0
);

$metric_display = array(
  'cpup' => 'CPU Usage',
  'memp' => 'Memory Usage',
  'vmsize' => 'Virutal Memory',
  'vmrss' => 'Virutal Resident Memory',
  'readbytes' => 'Disk I/O Read Bytes',
  'writebytes' => 'Disk I/O Write Bytes'
);

$metric_unit = array(
  'cpup' => 'Number of Cores',
  'memp' => 'Memory Percentage',
  'vmsize' => 'Bytes',
  'vmrss' => 'Bytes',
  'readbytes' => 'Bytes/sec',
  'writebytes' => 'Bytes/sec'
);

$metric_tips = array(
  'cpup' => 'Sum CPU usage over all nodes, the unit is number of cores',
  'memp' => 'Sum memory usage over all nodes',
  'vmsize' => 'Sum the virtual memory over all nodes',
  'vmrss' => 'Sum the virtual resident memory over all nodes',
  'readbytes' => 'Sum DISK I/O read throughput over all nodes',
  'writebytes' => 'Sum DISK I/O write throughput over all nodes',
);

$hadoopMetricList = array("cpup", "memp", "vmsize", "vmrss", "readbytes", "writebytes");

$numMapSlots = 6;
$numReduceSlots = 4;
?>
